<ul class="unstyled" id="nav">
    <?php
    foreach ($arrCategory as $cate)
    {
    ?>
    <li>
        <a<?php echo ((isset($cateID) && $cate['category_id'] == $cateID))?' class="active"':''; ?> href="<?php echo base_url().'category/'.$cate['slug'].'/'.$cate['category_id'].'.html'; ?>">
            <?php echo $cate['title']; ?>
        </a><span>&nbsp;</span>
    <?php
        if(isset($cate['child']))
        {
            echo '<ul class="sub-menu hide">';
            foreach ($cate['child'] as $child) {
    ?>
            <li>
                <a<?php echo ((isset($cateID) && $child['category_id'] == $cateID))?' class="active"':''; ?> href="<?php echo base_url().'category/'.$child['slug'].'/'.$child['category_id'].'.html'; ?>">
                    <?php echo $child['title']; ?>
                </a>
            </li>
    <?php
            }
            echo '</ul>';
        }
    }
    ?>
    </li>
    <li><a<?php echo ($_globals['method_name'] == 'about')?' class="active"':''; ?> href="<?php echo base_url(); ?>gioi-thieu.html">Giới thiệu</a><span>&nbsp;</span></li>
    <li><a<?php echo ($_globals['method_name'] == 'contact')?' class="active"':''; ?> href="<?php echo base_url(); ?>lien-he.html">Liên hệ</a><span>&nbsp;</span></li>
</ul>